/*
* Process.js file is used for creating the process structure
* 
* Author : Mallikarjun
* Date : 03/22/2002
* 
*/

/*
* Process object constructor
*
*  Arguments are
*  processName is base product name
*  processID is come from the database
*/

function Process(processName, processID){
      this.window = window;
	this.processName = processName;
	this.processID = processID;
	
	/* this.left = left;
	 * this.top = top;
	 * this.width = width;
	*/
	this.count = 0;
	this.processStep = new Array();
}

if(navigator.appName.indexOf("Microsoft") != -1){

	Process.prototype.addProcessStep = function(step){
		this.processStep[this.count]=step;
		this.count++;
	}

	Process.prototype.modifyProcessStep = function(){
	}

	Process.prototype.deleteProcessStep = function(processStep){
	}

	Process.prototype.getName = function(){
		return this.processName;
	}

	Process.prototype.getID = function(){
		return this.processID;
	}

	Process.prototype.getSteps = function(){
		return this.processStep;
	}

	Process.prototype.getStep = function(index){
		return this.processStep[index];
	}

	Process.prototype.getStepName = function(index){
		return this.processStep[index].getName();
	}

	Process.prototype.getStepID = function(index){
		return this.processStep[index].getID();
	}

	Process.prototype.getStepHrefs = function(index){
		return this.processStep[index].getHref();
	}

	Process.prototype.getProductNames =function(stepName){
		return this.processStep[stepName].getProductNames();
	}

	Process.prototype.getProductIDs = function(stepName){
		return this.processStep[stepName].getProductIDs();
	}

	Process.prototype.getProductHrefs = function(stepName){
		return this.processStep[stepName].getProductHrefs();
	}

	Process.prototype.getLocations =function(stepName, productName){
		return this.processStep[stepName].getLocations(productName);
	}
	
	Process.prototype.getLocationIDs = function(stepName, productName){
		return this.processStep[stepName].getLocationIDs(productName);
	}

	Process.prototype.getLocationHrefs = function(stepName, productName){
		return this.processStep[stepName].getLocationHrefs(productName);
	}

	Process.prototype.getLotNames = function(stepName, productName, locName){
		return this.processStep[stepName].getLotNames(productName,locName);
	}
	
	Process.prototype.getLotIDs = function(stepName, productName, locName){
		return this.processStep[stepName].getLotIDs(productName, locName);
	}

	Process.prototype.getLotHrefs = function(stepName, productName, locName){
		return this.processStep[stepName].getLotHrefs(productName,locName);
	}
}

if(navigator.appName.indexOf("Netscape") != -1){
	Process.prototype.init = function(){
	}

	Process.prototype.createProcess = function(){
	}

	Process.prototype.addProcessStep = function(){
	}

	Process.prototype.modifyProcessStep = function(){
	}

	Process.prototype.deleteProcessStep = function(){
	}
}
